<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>佣金核算单</title>
    <link rel="stylesheet" href="${ctx}/css/common/list.css">
    <link rel="stylesheet" href="${ctx}/css/common/table.css">
    <%@include file="../include/commonFile.jsp" %>
    <style>
        .verify-info li {
            line-height: 30px;
            letter-spacing: 1.2px;
        }

        .aui-field-title {
            border: none;
            border-top: 1px solid #e2e2e2;
            text-align: center;
            margin: 15px 30px 0px;
            width: 20%;
        }

        .aui-field-title legend {
            padding: 0px 10px;
        }
    </style>
</head>
<body>
<!--头部-->
<%@include file="../include/header.jsp" %>
<div class="index-outside">
    <%@include file="../include/sidebar.jsp" %>
    <!--内容-->
    <section>
        <div class="section-main">

            <form class="layui-form" id="myForm" method="post" action="${ctx}/copartner/brokerage/updateBrokerage.do">
                <input type="hidden" name="projectId" value="${result.projectId}" />
                <input type="hidden" name="instanceId" value="${result.id}" />
                <div class="f-search-bar">
                    <fieldset class="aui-field-title">
                        <legend>金额核算</legend>
                    </fieldset>
                    <ul class="verify-info">
                        <li><div class="l">结算账户：</div>
                            <div class="member-cell l" style="max-width: 30%">
                                <div class="member-logo" style="background-image: url('${result.logo}')"></div>
                                <div class="member-name ellipsis-1">
                                    <a class="blue" title="${result.realname}" href="javascript:void(0);">${result.realname}</a>
                                </div>
                            </div>
                            <div class="cl"></div>
                        </li>
                        <li>项目名称：<span>${result.title}</span></li>
                        <li>成功时间：<span><fmt:formatDate value="${result.successDate}" pattern="yyyy-MM-dd HH:mm"/></span></li>
                        <li>项目金额：<span>¥<fmt:formatNumber pattern="0.00" value="${result.totalPrice}"/>元</span></li>
                        <li>佣&emsp;&emsp;金：<input name="brokerage" type="number" min="1" class="layui-input" value="${result.brokerage}" style="width: 100px; display: inline-block; margin-right: 5px" />元</li>
                    </ul>
                    <fieldset class="aui-field-title">
                        <legend>备注信息</legend>
                    </fieldset>
                    <ul>
                        <li>
                            <textarea class="layui-textarea" style="width: 450px"></textarea>
                        </li>
                    </ul>
                </div>
                <div class="layui-form-item" style="margin-top: 30px">
                    <div class="layui-input-block">
                        <a href="javascript:void(0);" class="layui-btn layui-btn-danger" lay-submit lay-filter="*">保存</a>
                        <a href="javascript:history.back();" class="layui-btn layui-btn-primary">取消</a>
                    </div>
                </div>
            </form>
        </div><!--底部-->
        <%@include file="../include/footer.jsp" %>
    </section>
</div>

<script type="text/javascript">
    $(function () {
        layui.use(['form'], function () {
            var form = layui.form;

            form.on('submit', function (data) {
                txz.submitObject(data.elem, function (callBack) {
                    var action = $("#myForm").attr("action");
                    $.post(action, $('#myForm').serialize(), function (res) {
                        typeof callBack === 'function' && callBack();
                        if (res.success) {
                            util.layerMsgSuccess('保存成功', function () {
                                location.href = "${ctx}/copartner/brokerage/verifyList.do";
                            });
                        } else {
                            util.layerMsgError("保存失败")
                        }
                    });
                });
                return false;
            });
        });
    })
</script>
<script type="text/javascript">
    txz.initHeader({
        nav:[{
            name: '佣金核算',
            href: '${ctx}/copartner/brokerage/verifyList.do'
        },{
            name: '佣金核算单',
            curr: true
        }],
        btns:[{
            name: '返回',
            href: '${ctx}/copartner/brokerage/verifyList.do',
            icon: 'back'
        }]
    });
</script>
</body>
</html>